//全局方法
import Vue from 'vue';
let show=() => {
    console.log("全局防范——show——");
}
Vue.prototype.$show=show;//由于目前是绑在vue的原型身上，所以服务端的钩子是不可以使用的，因为服务端的钩子中this不会指向vue

//全局过滤器
import * as filters from '~/assets/script/filter'

Object.keys(filters).forEach(key=>Vue.filter(key,filters[key]));

//全局指令
import direc1 from '~/assets/script/directives/direc1'
import direc2 from '~/assets/script/directives/direc2'
Vue.directive('direc1',direc1)
Vue.directive('direc2',direc2)

//全局组件
import UcButton from '~/components/global/uc-button/uc-button.vue'
Vue.component('uc-button',UcButton)

//混入methods
Vue.mixin({
    methods:{
        $seo(title,content,payload=[]){
            return{
                title,
                meta:[{
                    hid:"description",
                    name:"keywords",
                    content
                }
                ].concat(payload)
            }
        }
    }    
})